package com.suixun.servlet;

import java.util.TimeZone;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

public class WebSiteInit extends HttpServlet {
    private static final long serialVersionUID = 1L;

    @Override
    public void destroy() {
        super.destroy();
    }

    public WebSiteInit() {
        super();
    }

    /**
     * Initialization of the servlet. <br>
     * 
     * @throws ServletException if an error occurs
     */
    @Override
    public void init() throws ServletException {
        System.out.println(TimeZone.getDefault()); // 输出当前默认时区
        final TimeZone zone = TimeZone.getTimeZone("GMT+8"); // 获取中国时区
        TimeZone.setDefault(zone); // 设置时区
        System.out.println(TimeZone.getDefault()); // 输出验证
         
/*        ApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml");  
        
        CMDDeal te = (CMDDeal)appContext.getBean("cmdDealJob");  
        te.printMessages();  */
    }
}
